home *** CD-ROM | disk | FTP | other *** search
- ; This very simple program (!! 286 !! no pmode !! snif !!) only :
- ; 1) loads the precalc to code-segment
- ; 2) generates weird plasma-texture
- ; 3) uses precalcs and adds little extra like :
- ; a) dots in middle of the tunnel are lighter
- ; b) motion blur
- ; 3) double pixels in rough way. (hey..it's meant to 286 machines.)
- ; Also there's a lot of unused things, but I hope that you only use
- ; the idea of this program. If you rip this, it's your fault.
- ; This whole thing is very simple and I hope that if you use these
- ; kind of effects, use them with STYLE! Tunnel-only effect is very boring..
-
- ; PlastiikkiPaketti / Skraappa!Skruuppi 1996 (c) pah just kiddin
-
-
- ; This code has no comments! Real coders need no comments. Be a real coder!
-
- locals
-
- code SEGMENT para public 'CODE'
- ASSUME cs:code;ds:code
-
- .286
- org 100h
-
- staks segment para stack 'stack'
- assume ss:staks
- staka db 200h dup ('ding')
- staks ends
-
-
- wait_ver MACRO ; Odottaa vertical retracea...
- local wait,wait2 ; Siis tahdistaa 70Hz:ksi. (Tai sitten ei...)
- push dx
- push ax
- mov dx,3dah
- wait: in al,dx
- test al,8
- jnz wait
- wait2: in al,dx
- test al,8
- jz wait2
- pop ax
- pop dx
- ENDM
-
- start:
- jmp main
-
- ;****************************************************************************
- ; DATA
- ;****************************************************************************
-
-
- include sin2cos2.inc
- include pal.inc
- include delshade.inc
- include plasma.asm
-
- sad dw 0
- row db 1
- attr db 1
-
- ;****************************************************************************
- ; PROCEDURES
- ;****************************************************************************
- setmodetw proc far
- mov ax,0013h
- int 10h
-
- MOV DX,3c4h
- MOV AX,604h
- OUT DX,AX
-
- MOV DX,3D4h
- MOV AX,14h
- OUT DX,AX
- MOV AX,0E317h
- OUT DX,AX
- MOV AL,9
- OUT DX,AL
-
- INC DX
- IN AL,DX
- AND AL,0E0h
- ADD AL,8
- OUT DX,AL
-
- dec dx
- MOV AX,0F02h
- OUT DX,AX
-
- mov ax,0a000h
- mov es,ax
- xor di,di
- mov cx,32000
- xor ax,ax
- rep stosw
-
- ret
- setmodetw endp
-
- start_add proc near
- push dx
- mov dx,3d4h
- mov al,0ch
- out dx,al
- inc dx
- mov al,bh
- out dx,al
-
- mov al,0dh
- mov dx,3d4h
- out dx,al
- inc dx
- mov al,bl
- out dx,al
- pop dx
- ret
- start_add ENDP
-
- xl db 0
- yl db 0
- kr dw 0
-
- raid proc near
- mov ax,seg virt2
- mov es,ax
- mov di,offset virt2
- mov ax,seg tila
- mov ds,ax
- mov si,offset precalc
- mov cx,16000
- x_ad:
- mov bx,cs:[si]
-
- add bl,xl
- add bh,yl
-
- mov al,ds:[bx]
- mov ah,cs:[si+1]
- neg ah
- sub al,ah
- add es:[di],al
- jnc iskall
- mov byte ptr es:[di],255
- iskall:
- inc di
- add si,2
- loop x_ad
-
- add yl,1
- add xl,1
-
- ret
-
- raid endp
-
- motion_blur proc near
- mov ax,seg virt2
- mov es,ax
- xor di,di
- xor bx,bx
- mov cx,16000
- dinaga:
- mov bl,es:[di]
- mov al,cs:shade[bx]
- stosb
- loop dinaga
- ret
- motion_blur endp
-
-
-
- filename db 'analraid.dat',0
-
- main proc far
-
- mov ax,3d00h
- mov dx,seg filename
- mov ds,dx
- mov dx,offset filename
- int 21h
-
- mov bx,ax
- mov cx,16000*2
- mov ax,cs
- mov ds,ax
- mov dx,offset precalc
- mov ah,3fh
- int 21h
-
- mov ah,3eh
- int 21h
-
- call plasma
-
- mov ax,13h
- int 10h
-
- mov dx,3c8h
- xor al,al
- out dx,al
- inc dx
- mov cx,768
- mov si,offset pal
- mov ax,seg pal
- mov ds,ax
- rep outsb
-
-
- rynnkari:
- call raid
-
- mov ax,0a000h
- mov es,ax
- xor di,di
- mov ax,seg virt2
- mov ds,ax
- mov si,offset virt2
- mov dx,100
- peray:
- mov cx,160
- perax:
- lodsb
- mov ah,al
- mov es:[di+320],ax
- stosw
- loop perax
- add di,320
- dec dx
- jnz peray
-
- call motion_blur
-
- in al,60h
- cmp al,1
- jne rynnkari
-
- mov ax,3h
- int 10h
-
- mov ax,4c00h
- int 21h
-
- main endp
-
- precalc db 32000 dup (?)
-
-
- code ENDS
-
- data3 segment para 'dataz'
- virt2 db 16000 dup (?)
- data3 ends
-
- data1 segment para 'data0'
- tila db 65535 dup (?)
- data1 ends
-
- dataa segment para 'dumppi'
- dump db 100 dup (?)
- dataa ends
-
- end start
-